Plot Data
library(ggplot2)
# raw data
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=FALSE, colour="#666666") +
geom_point(aes(colour=Treatment, shape=Experiment), size=2) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_shape_manual(values=15:19) +
scale_color_manual(values=c("#999999","#0072B2","#CC79A7","#009E73"))

# NormCounts Linear
ggplot(dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,6,7)],], aes(x=Olaparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts Quadratic
ggplot(dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,6,7)],], aes(x=Olaparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts Cubic
ggplot(dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,6,7)],], aes(x=Olaparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts2 Linear
ggplot(dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,6,7)],], aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts2 Quadratic
ggplot(dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,6,7)],], aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts2 Cubic
ggplot(dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,6,7)],], aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

library(Cairo)
cairo_pdf("Figure1D_v1.pdf", width = 10, height = 4, family = "Arial")
datasubset <- dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,3,7)],]
datasubset$genotype <- relevel(datasubset$genotype, ref = "WT")
ggplot(datasubset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype)) +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, aes(colour = genotype), fill='#DDDDDD', size=0.5) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#800000','#000080','#808080'))
dev.off()
## quartz_off_screen
## 2
cairo_pdf("Figure1D_v2.pdf", width = 6, height = 4, family = "Arial")
ggplot(datasubset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype), size=1.75) +
geom_smooth(method=lm, formula = y ~ poly(x,2), se=TRUE,
aes(group = genotype, colour = genotype), fill='#DDDDDD', size=0.5) +
#facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#800000','#000080','#808080'))
dev.off()
## quartz_off_screen
## 2
cairo_pdf("FigureS1D.pdf", width = 6, height = 4, family = "Arial")
datasubset <- dataset[dataset$genotype %in% levels(dataset$genotype)[c(1,2,4,5,6)],]
datasubset$genotype <- relevel(datasubset$genotype, ref = "WT")
ggplot(datasubset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype), size=1.75) +
geom_smooth(method=lm, formula = y ~ poly(x,2), se=TRUE,
aes(group = genotype, colour = genotype), fill='#DDDDDD', size=0.5) +
#facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#800000','#000080','#008080','#808080'))
dev.off()
## quartz_off_screen
## 2
Models
library(DHARMa)
library(lme4)
library(lmerTest)
library(bbmle)
Linear formula
fit1 <- lm(Counts ~ Experiment + Olaparib*genotype, data = dataset)
print(summary(fit1))
##
## Call:
## lm(formula = Counts ~ Experiment + Olaparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1292.19 -350.47 38.16 344.43 1059.70
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3086.986 231.702 13.323 < 2e-16 ***
## Experimentexp2 88.214 132.029 0.668 0.50566
## Experimentexp3 75.893 132.029 0.575 0.56677
## Experimentexp4 -92.000 132.029 -0.697 0.48762
## Olaparib -461.295 96.131 -4.799 5.93e-06 ***
## genotypePARP1 KO -703.721 307.079 -2.292 0.02413 *
## genotypeALC1 KO #1 -162.311 307.079 -0.529 0.59834
## genotypeALC1 KO #2 390.719 307.079 1.272 0.20635
## genotypeALC1 KO #3 -6.139 307.079 -0.020 0.98409
## genotypeALC1 KO PARP1 KO #1 766.569 307.079 2.496 0.01427 *
## genotypeALC1 KO PARP1 KO #2 -814.690 307.079 -2.653 0.00935 **
## Olaparib:genotypePARP1 KO 237.996 135.949 1.751 0.08324 .
## Olaparib:genotypeALC1 KO #1 -188.358 135.949 -1.386 0.16914
## Olaparib:genotypeALC1 KO #2 -282.536 135.949 -2.078 0.04038 *
## Olaparib:genotypeALC1 KO #3 -174.456 135.949 -1.283 0.20253
## Olaparib:genotypeALC1 KO PARP1 KO #1 70.240 135.949 0.517 0.60659
## Olaparib:genotypeALC1 KO PARP1 KO #2 185.734 135.949 1.366 0.17510
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 494 on 95 degrees of freedom
## Multiple R-squared: 0.757, Adjusted R-squared: 0.7161
## F-statistic: 18.5 on 16 and 95 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit1))
## AIC: 1724.775
simres <- simulateResiduals(fittedModel = fit1)
plot(simres)

fit2 <- lm(NormCounts ~ Olaparib*genotype, data = dataset)
print(summary(fit2))
##
## Call:
## lm(formula = NormCounts ~ Olaparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31437 -0.06435 0.00226 0.07579 0.32955
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.38641 0.05086 27.257 < 2e-16 ***
## Olaparib -0.20799 0.02252 -9.236 5.50e-15 ***
## genotypePARP1 KO -0.18322 0.07193 -2.547 0.012420 *
## genotypeALC1 KO #1 0.32837 0.07193 4.565 1.45e-05 ***
## genotypeALC1 KO #2 0.28288 0.07193 3.933 0.000157 ***
## genotypeALC1 KO #3 0.24407 0.07193 3.393 0.000998 ***
## genotypeALC1 KO PARP1 KO #1 -0.14969 0.07193 -2.081 0.040041 *
## genotypeALC1 KO PARP1 KO #2 -0.10276 0.07193 -1.429 0.156307
## Olaparib:genotypePARP1 KO 0.09862 0.03185 3.097 0.002552 **
## Olaparib:genotypeALC1 KO #1 -0.17675 0.03185 -5.550 2.44e-07 ***
## Olaparib:genotypeALC1 KO #2 -0.15226 0.03185 -4.781 6.14e-06 ***
## Olaparib:genotypeALC1 KO #3 -0.13138 0.03185 -4.125 7.77e-05 ***
## Olaparib:genotypeALC1 KO PARP1 KO #1 0.08057 0.03185 2.530 0.012996 *
## Olaparib:genotypeALC1 KO PARP1 KO #2 0.05531 0.03185 1.737 0.085552 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1157 on 98 degrees of freedom
## Multiple R-squared: 0.9075, Adjusted R-squared: 0.8953
## F-statistic: 73.99 on 13 and 98 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit2))
## AIC: -150.187
simres <- simulateResiduals(fittedModel = fit2)
plot(simres)

fit3 <- lm(NormCounts2 ~ Olaparib*genotype, data = dataset)
print(summary(fit3))
##
## Call:
## lm(formula = NormCounts2 ~ Olaparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.173053 -0.051127 0.001775 0.049137 0.188241
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.043751 0.033393 31.257 < 2e-16 ***
## Olaparib -0.156582 0.014784 -10.592 < 2e-16 ***
## genotypePARP1 KO 0.001535 0.047225 0.032 0.97414
## genotypeALC1 KO #1 -0.099811 0.047225 -2.114 0.03709 *
## genotypeALC1 KO #2 -0.090257 0.047225 -1.911 0.05890 .
## genotypeALC1 KO #3 -0.078773 0.047225 -1.668 0.09850 .
## genotypeALC1 KO PARP1 KO #1 -0.034224 0.047225 -0.725 0.47036
## genotypeALC1 KO PARP1 KO #2 -0.004103 0.047225 -0.087 0.93094
## Olaparib:genotypePARP1 KO 0.061566 0.020907 2.945 0.00404 **
## Olaparib:genotypeALC1 KO #1 -0.055204 0.020907 -2.640 0.00964 **
## Olaparib:genotypeALC1 KO #2 -0.049192 0.020907 -2.353 0.02063 *
## Olaparib:genotypeALC1 KO #3 -0.044265 0.020907 -2.117 0.03677 *
## Olaparib:genotypeALC1 KO PARP1 KO #1 0.052575 0.020907 2.515 0.01354 *
## Olaparib:genotypeALC1 KO PARP1 KO #2 0.032928 0.020907 1.575 0.11849
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07597 on 98 degrees of freedom
## Multiple R-squared: 0.9217, Adjusted R-squared: 0.9113
## F-statistic: 88.7 on 13 and 98 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit3))
## AIC: -244.4496
simres <- simulateResiduals(fittedModel = fit3)
plot(simres)

fit4 <- lmer(Counts ~ Olaparib*genotype + (1|UID), data = dataset)
print(summary(fit4))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ Olaparib * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 1452.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.0250 -0.4734 0.0399 0.5726 1.5679
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 216177 464.9
## Residual 57192 239.1
## Number of obs: 112, groups: UID, 28
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 3105.013 255.135 26.680 12.170
## Olaparib -461.295 46.537 77.000 -9.912
## genotypePARP1 KO -703.721 360.815 26.680 -1.950
## genotypeALC1 KO #1 -162.311 360.815 26.680 -0.450
## genotypeALC1 KO #2 390.719 360.815 26.680 1.083
## genotypeALC1 KO #3 -6.139 360.815 26.680 -0.017
## genotypeALC1 KO PARP1 KO #1 766.569 360.815 26.680 2.125
## genotypeALC1 KO PARP1 KO #2 -814.690 360.815 26.680 -2.258
## Olaparib:genotypePARP1 KO 237.996 65.813 77.000 3.616
## Olaparib:genotypeALC1 KO #1 -188.358 65.813 77.000 -2.862
## Olaparib:genotypeALC1 KO #2 -282.536 65.813 77.000 -4.293
## Olaparib:genotypeALC1 KO #3 -174.456 65.813 77.000 -2.651
## Olaparib:genotypeALC1 KO PARP1 KO #1 70.240 65.813 77.000 1.067
## Olaparib:genotypeALC1 KO PARP1 KO #2 185.734 65.813 77.000 2.822
## Pr(>|t|)
## (Intercept) 2.13e-12 ***
## Olaparib 2.12e-15 ***
## genotypePARP1 KO 0.061712 .
## genotypeALC1 KO #1 0.656457
## genotypeALC1 KO #2 0.288552
## genotypeALC1 KO #3 0.986552
## genotypeALC1 KO PARP1 KO #1 0.043042 *
## genotypeALC1 KO PARP1 KO #2 0.032346 *
## Olaparib:genotypePARP1 KO 0.000532 ***
## Olaparib:genotypeALC1 KO #1 0.005419 **
## Olaparib:genotypeALC1 KO #2 5.08e-05 ***
## Olaparib:genotypeALC1 KO #3 0.009744 **
## Olaparib:genotypeALC1 KO PARP1 KO #1 0.289192
## Olaparib:genotypeALC1 KO PARP1 KO #2 0.006067 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit4))
## AIC: 1484.326
simres <- simulateResiduals(fittedModel = fit4)
plot(simres)

Quadratic formula
fit5 <- lm(Counts ~ Experiment + poly(Olaparib, 2)*genotype, data = dataset)
print(summary(fit5))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 2) * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1221.99 -313.25 -4.75 325.69 1129.90
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 2229.97 148.27 15.040
## Experimentexp2 88.21 132.61 0.665
## Experimentexp3 75.89 132.61 0.572
## Experimentexp4 -92.00 132.61 -0.694
## poly(Olaparib, 2)1 -6271.89 1312.81 -4.777
## poly(Olaparib, 2)2 -1344.84 1312.81 -1.024
## genotypePARP1 KO -261.56 175.43 -1.491
## genotypeALC1 KO #1 -512.25 175.43 -2.920
## genotypeALC1 KO #2 -134.19 175.43 -0.765
## genotypeALC1 KO #3 -330.25 175.43 -1.883
## genotypeALC1 KO PARP1 KO #1 897.06 175.43 5.113
## genotypeALC1 KO PARP1 KO #2 -469.62 175.43 -2.677
## poly(Olaparib, 2)1:genotypePARP1 KO 3235.85 1856.59 1.743
## poly(Olaparib, 2)2:genotypePARP1 KO -95.58 1856.59 -0.051
## poly(Olaparib, 2)1:genotypeALC1 KO #1 -2560.97 1856.59 -1.379
## poly(Olaparib, 2)2:genotypeALC1 KO #1 2809.89 1856.59 1.513
## poly(Olaparib, 2)1:genotypeALC1 KO #2 -3841.44 1856.59 -2.069
## poly(Olaparib, 2)2:genotypeALC1 KO #2 3027.78 1856.59 1.631
## poly(Olaparib, 2)1:genotypeALC1 KO #3 -2371.95 1856.59 -1.278
## poly(Olaparib, 2)2:genotypeALC1 KO #3 2323.84 1856.59 1.252
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 955.00 1856.59 0.514
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 977.10 1856.59 0.526
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 2525.30 1856.59 1.360
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 528.20 1856.59 0.285
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## Experimentexp2 0.50766
## Experimentexp3 0.56859
## Experimentexp4 0.48967
## poly(Olaparib, 2)1 7.05e-06 ***
## poly(Olaparib, 2)2 0.30845
## genotypePARP1 KO 0.13955
## genotypeALC1 KO #1 0.00445 **
## genotypeALC1 KO #2 0.44638
## genotypeALC1 KO #3 0.06307 .
## genotypeALC1 KO PARP1 KO #1 1.83e-06 ***
## genotypeALC1 KO PARP1 KO #2 0.00886 **
## poly(Olaparib, 2)1:genotypePARP1 KO 0.08484 .
## poly(Olaparib, 2)2:genotypePARP1 KO 0.95906
## poly(Olaparib, 2)1:genotypeALC1 KO #1 0.17127
## poly(Olaparib, 2)2:genotypeALC1 KO #1 0.13374
## poly(Olaparib, 2)1:genotypeALC1 KO #2 0.04147 *
## poly(Olaparib, 2)2:genotypeALC1 KO #2 0.10650
## poly(Olaparib, 2)1:genotypeALC1 KO #3 0.20476
## poly(Olaparib, 2)2:genotypeALC1 KO #3 0.21401
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 0.60828
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 0.60001
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 0.17725
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 0.77670
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 496.2 on 88 degrees of freedom
## Multiple R-squared: 0.7729, Adjusted R-squared: 0.7135
## F-statistic: 13.02 on 23 and 88 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit5))
## AIC: 1731.193
simres <- simulateResiduals(fittedModel = fit5)
plot(simres)

fit6 <- lm(NormCounts ~ poly(Olaparib, 2)*genotype, data = dataset)
print(summary(fit6))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 2) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.224412 -0.037884 -0.002421 0.044466 0.256725
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.395e-02 41.754
## poly(Olaparib, 2)1 -2.828e+00 2.535e-01 -11.157
## poly(Olaparib, 2)2 -6.107e-01 2.535e-01 -2.409
## genotypePARP1 KO 3.457e-16 3.387e-02 0.000
## genotypeALC1 KO #1 3.350e-16 3.387e-02 0.000
## genotypeALC1 KO #2 1.906e-16 3.387e-02 0.000
## genotypeALC1 KO #3 1.399e-16 3.387e-02 0.000
## genotypeALC1 KO PARP1 KO #1 2.704e-16 3.387e-02 0.000
## genotypeALC1 KO PARP1 KO #2 2.969e-16 3.387e-02 0.000
## poly(Olaparib, 2)1:genotypePARP1 KO 1.341e+00 3.585e-01 3.741
## poly(Olaparib, 2)2:genotypePARP1 KO -1.201e-01 3.585e-01 -0.335
## poly(Olaparib, 2)1:genotypeALC1 KO #1 -2.403e+00 3.585e-01 -6.704
## poly(Olaparib, 2)2:genotypeALC1 KO #1 1.622e+00 3.585e-01 4.525
## poly(Olaparib, 2)1:genotypeALC1 KO #2 -2.070e+00 3.585e-01 -5.775
## poly(Olaparib, 2)2:genotypeALC1 KO #2 1.458e+00 3.585e-01 4.067
## poly(Olaparib, 2)1:genotypeALC1 KO #3 -1.786e+00 3.585e-01 -4.983
## poly(Olaparib, 2)2:genotypeALC1 KO #3 1.196e+00 3.585e-01 3.336
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 1.096e+00 3.585e-01 3.056
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 4.771e-01 3.585e-01 1.331
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 7.520e-01 3.585e-01 2.098
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 3.420e-02 3.585e-01 0.095
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 < 2e-16 ***
## poly(Olaparib, 2)2 0.017990 *
## genotypePARP1 KO 1.000000
## genotypeALC1 KO #1 1.000000
## genotypeALC1 KO #2 1.000000
## genotypeALC1 KO #3 1.000000
## genotypeALC1 KO PARP1 KO #1 1.000000
## genotypeALC1 KO PARP1 KO #2 1.000000
## poly(Olaparib, 2)1:genotypePARP1 KO 0.000321 ***
## poly(Olaparib, 2)2:genotypePARP1 KO 0.738439
## poly(Olaparib, 2)1:genotypeALC1 KO #1 1.66e-09 ***
## poly(Olaparib, 2)2:genotypeALC1 KO #1 1.82e-05 ***
## poly(Olaparib, 2)1:genotypeALC1 KO #2 1.06e-07 ***
## poly(Olaparib, 2)2:genotypeALC1 KO #2 0.000101 ***
## poly(Olaparib, 2)1:genotypeALC1 KO #3 2.97e-06 ***
## poly(Olaparib, 2)2:genotypeALC1 KO #3 0.001232 **
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 0.002942 **
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 0.186540
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 0.038674 *
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 0.924202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0958 on 91 degrees of freedom
## Multiple R-squared: 0.9412, Adjusted R-squared: 0.9282
## F-statistic: 72.77 on 20 and 91 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit6))
## AIC: -186.8034
simres <- simulateResiduals(fittedModel = fit6)
plot(simres)

fit7 <- lm(NormCounts2 ~ poly(Olaparib, 2)*genotype, data = dataset)
print(summary(fit7))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 2) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.132815 -0.030932 -0.001158 0.033036 0.146641
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.752846 0.015507 48.547
## poly(Olaparib, 2)1 -2.128936 0.164116 -12.972
## poly(Olaparib, 2)2 -0.459768 0.164116 -2.801
## genotypePARP1 KO 0.115915 0.021931 5.285
## genotypeALC1 KO #1 -0.202372 0.021931 -9.228
## genotypeALC1 KO #2 -0.181647 0.021931 -8.283
## genotypeALC1 KO #3 -0.161010 0.021931 -7.342
## genotypeALC1 KO PARP1 KO #1 0.063452 0.021931 2.893
## genotypeALC1 KO PARP1 KO #2 0.057072 0.021931 2.602
## poly(Olaparib, 2)1:genotypePARP1 KO 0.837073 0.232095 3.607
## poly(Olaparib, 2)2:genotypePARP1 KO -0.175094 0.232095 -0.754
## poly(Olaparib, 2)1:genotypeALC1 KO #1 -0.750574 0.232095 -3.234
## poly(Olaparib, 2)2:genotypeALC1 KO #1 1.016525 0.232095 4.380
## poly(Olaparib, 2)1:genotypeALC1 KO #2 -0.668821 0.232095 -2.882
## poly(Olaparib, 2)2:genotypeALC1 KO #2 0.943698 0.232095 4.066
## poly(Olaparib, 2)1:genotypeALC1 KO #3 -0.601835 0.232095 -2.593
## poly(Olaparib, 2)2:genotypeALC1 KO #3 0.806003 0.232095 3.473
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 0.714823 0.232095 3.080
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 0.350681 0.232095 1.511
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 0.447700 0.232095 1.929
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 -0.007157 0.232095 -0.031
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 < 2e-16 ***
## poly(Olaparib, 2)2 0.006214 **
## genotypePARP1 KO 8.54e-07 ***
## genotypeALC1 KO #1 1.05e-14 ***
## genotypeALC1 KO #2 9.92e-13 ***
## genotypeALC1 KO #3 8.63e-11 ***
## genotypeALC1 KO PARP1 KO #1 0.004771 **
## genotypeALC1 KO PARP1 KO #2 0.010808 *
## poly(Olaparib, 2)1:genotypePARP1 KO 0.000506 ***
## poly(Olaparib, 2)2:genotypePARP1 KO 0.452552
## poly(Olaparib, 2)1:genotypeALC1 KO #1 0.001702 **
## poly(Olaparib, 2)2:genotypeALC1 KO #1 3.17e-05 ***
## poly(Olaparib, 2)1:genotypeALC1 KO #2 0.004934 **
## poly(Olaparib, 2)2:genotypeALC1 KO #2 0.000101 ***
## poly(Olaparib, 2)1:genotypeALC1 KO #3 0.011084 *
## poly(Olaparib, 2)2:genotypeALC1 KO #3 0.000790 ***
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 0.002738 **
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 0.134268
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 0.056853 .
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 0.975469
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06203 on 91 degrees of freedom
## Multiple R-squared: 0.9515, Adjusted R-squared: 0.9409
## F-statistic: 89.28 on 20 and 91 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit7))
## AIC: -284.1646
simres <- simulateResiduals(fittedModel = fit7)
plot(simres)

fit8 <- lmer(Counts ~ poly(Olaparib, 2)*genotype + (1|UID), data = dataset)
print(summary(fit8))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 2) * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 1282.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.70753 -0.56360 0.09369 0.52591 1.63379
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 220167 469.2
## Residual 41233 203.1
## Number of obs: 112, groups: UID, 28
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 2248.00 240.04 21.00
## poly(Olaparib, 2)1 -6271.89 537.24 70.00
## poly(Olaparib, 2)2 -1344.84 537.24 70.00
## genotypePARP1 KO -261.56 339.47 21.00
## genotypeALC1 KO #1 -512.25 339.47 21.00
## genotypeALC1 KO #2 -134.19 339.47 21.00
## genotypeALC1 KO #3 -330.25 339.47 21.00
## genotypeALC1 KO PARP1 KO #1 897.06 339.47 21.00
## genotypeALC1 KO PARP1 KO #2 -469.63 339.47 21.00
## poly(Olaparib, 2)1:genotypePARP1 KO 3235.85 759.78 70.00
## poly(Olaparib, 2)2:genotypePARP1 KO -95.58 759.78 70.00
## poly(Olaparib, 2)1:genotypeALC1 KO #1 -2560.97 759.78 70.00
## poly(Olaparib, 2)2:genotypeALC1 KO #1 2809.89 759.78 70.00
## poly(Olaparib, 2)1:genotypeALC1 KO #2 -3841.44 759.78 70.00
## poly(Olaparib, 2)2:genotypeALC1 KO #2 3027.78 759.78 70.00
## poly(Olaparib, 2)1:genotypeALC1 KO #3 -2371.95 759.78 70.00
## poly(Olaparib, 2)2:genotypeALC1 KO #3 2323.84 759.78 70.00
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 955.00 759.78 70.00
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 977.10 759.78 70.00
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 2525.30 759.78 70.00
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 528.20 759.78 70.00
## t value Pr(>|t|)
## (Intercept) 9.365 6.03e-09 ***
## poly(Olaparib, 2)1 -11.674 < 2e-16 ***
## poly(Olaparib, 2)2 -2.503 0.014643 *
## genotypePARP1 KO -0.771 0.449579
## genotypeALC1 KO #1 -1.509 0.146202
## genotypeALC1 KO #2 -0.395 0.696616
## genotypeALC1 KO #3 -0.973 0.341701
## genotypeALC1 KO PARP1 KO #1 2.643 0.015224 *
## genotypeALC1 KO PARP1 KO #2 -1.383 0.181067
## poly(Olaparib, 2)1:genotypePARP1 KO 4.259 6.28e-05 ***
## poly(Olaparib, 2)2:genotypePARP1 KO -0.126 0.900254
## poly(Olaparib, 2)1:genotypeALC1 KO #1 -3.371 0.001223 **
## poly(Olaparib, 2)2:genotypeALC1 KO #1 3.698 0.000428 ***
## poly(Olaparib, 2)1:genotypeALC1 KO #2 -5.056 3.29e-06 ***
## poly(Olaparib, 2)2:genotypeALC1 KO #2 3.985 0.000163 ***
## poly(Olaparib, 2)1:genotypeALC1 KO #3 -3.122 0.002612 **
## poly(Olaparib, 2)2:genotypeALC1 KO #3 3.059 0.003150 **
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #1 1.257 0.212952
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #1 1.286 0.202669
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO #2 3.324 0.001416 **
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO #2 0.695 0.489228
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit8))
## AIC: 1328.72
simres <- simulateResiduals(fittedModel = fit8)
plot(simres)

Cubic formula
fit9 <- lm(Counts ~ Experiment + poly(Olaparib, 3)*genotype, data = dataset)
print(summary(fit9))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 3) * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1218.87 -309.44 -8.67 323.93 1133.03
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 2229.97 153.22 14.554
## Experimentexp2 88.21 137.04 0.644
## Experimentexp3 75.89 137.04 0.554
## Experimentexp4 -92.00 137.04 -0.671
## poly(Olaparib, 3)1 -6271.89 1356.64 -4.623
## poly(Olaparib, 3)2 -1344.84 1356.64 -0.991
## poly(Olaparib, 3)3 367.99 1356.64 0.271
## genotypePARP1 KO -261.56 181.29 -1.443
## genotypeALC1 KO #1 -512.25 181.29 -2.826
## genotypeALC1 KO #2 -134.19 181.29 -0.740
## genotypeALC1 KO #3 -330.25 181.29 -1.822
## genotypeALC1 KO PARP1 KO #1 897.06 181.29 4.948
## genotypeALC1 KO PARP1 KO #2 -469.62 181.29 -2.590
## poly(Olaparib, 3)1:genotypePARP1 KO 3235.85 1918.58 1.687
## poly(Olaparib, 3)2:genotypePARP1 KO -95.58 1918.58 -0.050
## poly(Olaparib, 3)3:genotypePARP1 KO -1186.25 1918.58 -0.618
## poly(Olaparib, 3)1:genotypeALC1 KO #1 -2560.97 1918.58 -1.335
## poly(Olaparib, 3)2:genotypeALC1 KO #1 2809.89 1918.58 1.465
## poly(Olaparib, 3)3:genotypeALC1 KO #1 -1272.78 1918.58 -0.663
## poly(Olaparib, 3)1:genotypeALC1 KO #2 -3841.44 1918.58 -2.002
## poly(Olaparib, 3)2:genotypeALC1 KO #2 3027.78 1918.58 1.578
## poly(Olaparib, 3)3:genotypeALC1 KO #2 -1095.97 1918.58 -0.571
## poly(Olaparib, 3)1:genotypeALC1 KO #3 -2371.95 1918.58 -1.236
## poly(Olaparib, 3)2:genotypeALC1 KO #3 2323.84 1918.58 1.211
## poly(Olaparib, 3)3:genotypeALC1 KO #3 -998.31 1918.58 -0.520
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 955.00 1918.58 0.498
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 977.10 1918.58 0.509
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 -220.56 1918.58 -0.115
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 2525.30 1918.58 1.316
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 528.20 1918.58 0.275
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 -252.01 1918.58 -0.131
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## Experimentexp2 0.52159
## Experimentexp3 0.58125
## Experimentexp4 0.50392
## poly(Olaparib, 3)1 1.41e-05 ***
## poly(Olaparib, 3)2 0.32449
## poly(Olaparib, 3)3 0.78689
## genotypePARP1 KO 0.15294
## genotypeALC1 KO #1 0.00594 **
## genotypeALC1 KO #2 0.46133
## genotypeALC1 KO #3 0.07220 .
## genotypeALC1 KO PARP1 KO #1 4.00e-06 ***
## genotypeALC1 KO PARP1 KO #2 0.01136 *
## poly(Olaparib, 3)1:genotypePARP1 KO 0.09553 .
## poly(Olaparib, 3)2:genotypePARP1 KO 0.96039
## poly(Olaparib, 3)3:genotypePARP1 KO 0.53812
## poly(Olaparib, 3)1:genotypeALC1 KO #1 0.18567
## poly(Olaparib, 3)2:genotypeALC1 KO #1 0.14691
## poly(Olaparib, 3)3:genotypeALC1 KO #1 0.50896
## poly(Olaparib, 3)1:genotypeALC1 KO #2 0.04861 *
## poly(Olaparib, 3)2:genotypeALC1 KO #2 0.11843
## poly(Olaparib, 3)3:genotypeALC1 KO #2 0.56942
## poly(Olaparib, 3)1:genotypeALC1 KO #3 0.21992
## poly(Olaparib, 3)2:genotypeALC1 KO #3 0.22933
## poly(Olaparib, 3)3:genotypeALC1 KO #3 0.60425
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 0.62000
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 0.61194
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 0.90876
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 0.19181
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 0.78378
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 0.89582
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 512.8 on 81 degrees of freedom
## Multiple R-squared: 0.7768, Adjusted R-squared: 0.6941
## F-statistic: 9.395 on 30 and 81 DF, p-value: 5.106e-16
cat("AIC: ", AIC(fit9))
## AIC: 1743.267
simres <- simulateResiduals(fittedModel = fit9)
plot(simres)

fit10 <- lm(NormCounts ~ poly(Olaparib, 3)*genotype, data = dataset)
print(summary(fit10))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 3) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.233299 -0.046833 0.007519 0.051494 0.248136
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.335e-02 42.835
## poly(Olaparib, 3)1 -2.828e+00 2.471e-01 -11.446
## poly(Olaparib, 3)2 -6.107e-01 2.471e-01 -2.472
## poly(Olaparib, 3)3 2.086e-01 2.471e-01 0.844
## genotypePARP1 KO 2.267e-16 3.302e-02 0.000
## genotypeALC1 KO #1 9.707e-17 3.302e-02 0.000
## genotypeALC1 KO #2 4.795e-16 3.302e-02 0.000
## genotypeALC1 KO #3 4.313e-16 3.302e-02 0.000
## genotypeALC1 KO PARP1 KO #1 3.832e-16 3.302e-02 0.000
## genotypeALC1 KO PARP1 KO #2 4.676e-16 3.302e-02 0.000
## poly(Olaparib, 3)1:genotypePARP1 KO 1.341e+00 3.494e-01 3.837
## poly(Olaparib, 3)2:genotypePARP1 KO -1.201e-01 3.494e-01 -0.344
## poly(Olaparib, 3)3:genotypePARP1 KO -6.058e-01 3.494e-01 -1.734
## poly(Olaparib, 3)1:genotypeALC1 KO #1 -2.403e+00 3.494e-01 -6.878
## poly(Olaparib, 3)2:genotypeALC1 KO #1 1.622e+00 3.494e-01 4.643
## poly(Olaparib, 3)3:genotypeALC1 KO #1 -7.619e-01 3.494e-01 -2.181
## poly(Olaparib, 3)1:genotypeALC1 KO #2 -2.070e+00 3.494e-01 -5.925
## poly(Olaparib, 3)2:genotypeALC1 KO #2 1.458e+00 3.494e-01 4.173
## poly(Olaparib, 3)3:genotypeALC1 KO #2 -5.276e-01 3.494e-01 -1.510
## poly(Olaparib, 3)1:genotypeALC1 KO #3 -1.786e+00 3.494e-01 -5.112
## poly(Olaparib, 3)2:genotypeALC1 KO #3 1.196e+00 3.494e-01 3.422
## poly(Olaparib, 3)3:genotypeALC1 KO #3 -5.387e-01 3.494e-01 -1.542
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 1.096e+00 3.494e-01 3.135
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 4.771e-01 3.494e-01 1.365
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 -2.018e-01 3.494e-01 -0.578
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 7.520e-01 3.494e-01 2.152
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 3.420e-02 3.494e-01 0.098
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 -2.311e-01 3.494e-01 -0.661
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 < 2e-16 ***
## poly(Olaparib, 3)2 0.015461 *
## poly(Olaparib, 3)3 0.400861
## genotypePARP1 KO 1.000000
## genotypeALC1 KO #1 1.000000
## genotypeALC1 KO #2 1.000000
## genotypeALC1 KO #3 1.000000
## genotypeALC1 KO PARP1 KO #1 1.000000
## genotypeALC1 KO PARP1 KO #2 1.000000
## poly(Olaparib, 3)1:genotypePARP1 KO 0.000240 ***
## poly(Olaparib, 3)2:genotypePARP1 KO 0.731994
## poly(Olaparib, 3)3:genotypePARP1 KO 0.086645 .
## poly(Olaparib, 3)1:genotypeALC1 KO #1 1.01e-09 ***
## poly(Olaparib, 3)2:genotypeALC1 KO #1 1.26e-05 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #1 0.032005 *
## poly(Olaparib, 3)1:genotypeALC1 KO #2 6.66e-08 ***
## poly(Olaparib, 3)2:genotypeALC1 KO #2 7.31e-05 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #2 0.134765
## poly(Olaparib, 3)1:genotypeALC1 KO #3 1.97e-06 ***
## poly(Olaparib, 3)2:genotypeALC1 KO #3 0.000962 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #3 0.126893
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 0.002366 **
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 0.175778
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 0.565075
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 0.034239 *
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 0.922264
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 0.510194
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09338 on 84 degrees of freedom
## Multiple R-squared: 0.9484, Adjusted R-squared: 0.9318
## F-statistic: 57.17 on 27 and 84 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit10))
## AIC: -187.4945
simres <- simulateResiduals(fittedModel = fit10)
plot(simres)

fit11 <- lm(NormCounts2 ~ poly(Olaparib, 3)*genotype, data = dataset)
print(summary(fit11))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.138074 -0.031185 0.005882 0.035369 0.141735
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.752846 0.015092 49.885
## poly(Olaparib, 3)1 -2.128936 0.159716 -13.329
## poly(Olaparib, 3)2 -0.459768 0.159716 -2.879
## poly(Olaparib, 3)3 0.157055 0.159716 0.983
## genotypePARP1 KO 0.115915 0.021343 5.431
## genotypeALC1 KO #1 -0.202372 0.021343 -9.482
## genotypeALC1 KO #2 -0.181647 0.021343 -8.511
## genotypeALC1 KO #3 -0.161010 0.021343 -7.544
## genotypeALC1 KO PARP1 KO #1 0.063452 0.021343 2.973
## genotypeALC1 KO PARP1 KO #2 0.057072 0.021343 2.674
## poly(Olaparib, 3)1:genotypePARP1 KO 0.837073 0.225873 3.706
## poly(Olaparib, 3)2:genotypePARP1 KO -0.175094 0.225873 -0.775
## poly(Olaparib, 3)3:genotypePARP1 KO -0.502073 0.225873 -2.223
## poly(Olaparib, 3)1:genotypeALC1 KO #1 -0.750574 0.225873 -3.323
## poly(Olaparib, 3)2:genotypeALC1 KO #1 1.016525 0.225873 4.500
## poly(Olaparib, 3)3:genotypeALC1 KO #1 -0.461642 0.225873 -2.044
## poly(Olaparib, 3)1:genotypeALC1 KO #2 -0.668821 0.225873 -2.961
## poly(Olaparib, 3)2:genotypeALC1 KO #2 0.943698 0.225873 4.178
## poly(Olaparib, 3)3:genotypeALC1 KO #2 -0.339283 0.225873 -1.502
## poly(Olaparib, 3)1:genotypeALC1 KO #3 -0.601835 0.225873 -2.664
## poly(Olaparib, 3)2:genotypeALC1 KO #3 0.806003 0.225873 3.568
## poly(Olaparib, 3)3:genotypeALC1 KO #3 -0.352408 0.225873 -1.560
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 0.714823 0.225873 3.165
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 0.350681 0.225873 1.553
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 -0.151507 0.225873 -0.671
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 0.447700 0.225873 1.982
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 -0.007157 0.225873 -0.032
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 -0.175250 0.225873 -0.776
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 < 2e-16 ***
## poly(Olaparib, 3)2 0.005064 **
## poly(Olaparib, 3)3 0.328265
## genotypePARP1 KO 5.35e-07 ***
## genotypeALC1 KO #1 6.36e-15 ***
## genotypeALC1 KO #2 5.73e-13 ***
## genotypeALC1 KO #3 4.92e-11 ***
## genotypeALC1 KO PARP1 KO #1 0.003848 **
## genotypeALC1 KO PARP1 KO #2 0.009004 **
## poly(Olaparib, 3)1:genotypePARP1 KO 0.000376 ***
## poly(Olaparib, 3)2:genotypePARP1 KO 0.440405
## poly(Olaparib, 3)3:genotypePARP1 KO 0.028915 *
## poly(Olaparib, 3)1:genotypeALC1 KO #1 0.001321 **
## poly(Olaparib, 3)2:genotypeALC1 KO #1 2.16e-05 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #1 0.044105 *
## poly(Olaparib, 3)1:genotypeALC1 KO #2 0.003985 **
## poly(Olaparib, 3)2:genotypeALC1 KO #2 7.16e-05 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #2 0.136822
## poly(Olaparib, 3)1:genotypeALC1 KO #3 0.009243 **
## poly(Olaparib, 3)2:genotypeALC1 KO #3 0.000597 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #3 0.122472
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 0.002162 **
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 0.124288
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 0.504213
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 0.050739 .
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 0.974799
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 0.439999
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06037 on 84 degrees of freedom
## Multiple R-squared: 0.9576, Adjusted R-squared: 0.944
## F-statistic: 70.28 on 27 and 84 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit11))
## AIC: -285.2159
simres <- simulateResiduals(fittedModel = fit11)
plot(simres)

fit12 <- lmer(Counts ~ poly(Olaparib, 3)*genotype + (1|UID), data = dataset)
print(summary(fit12))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 3) * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 1172.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.62206 -0.45619 -0.00004 0.51995 1.66007
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 220488 469.6
## Residual 39950 199.9
## Number of obs: 112, groups: UID, 28
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 2248.00 240.04 21.00
## poly(Olaparib, 3)1 -6271.89 528.82 63.00
## poly(Olaparib, 3)2 -1344.84 528.82 63.00
## poly(Olaparib, 3)3 367.99 528.82 63.00
## genotypePARP1 KO -261.56 339.47 21.00
## genotypeALC1 KO #1 -512.25 339.47 21.00
## genotypeALC1 KO #2 -134.19 339.47 21.00
## genotypeALC1 KO #3 -330.25 339.47 21.00
## genotypeALC1 KO PARP1 KO #1 897.06 339.47 21.00
## genotypeALC1 KO PARP1 KO #2 -469.63 339.47 21.00
## poly(Olaparib, 3)1:genotypePARP1 KO 3235.85 747.87 63.00
## poly(Olaparib, 3)2:genotypePARP1 KO -95.58 747.87 63.00
## poly(Olaparib, 3)3:genotypePARP1 KO -1186.25 747.87 63.00
## poly(Olaparib, 3)1:genotypeALC1 KO #1 -2560.97 747.87 63.00
## poly(Olaparib, 3)2:genotypeALC1 KO #1 2809.89 747.87 63.00
## poly(Olaparib, 3)3:genotypeALC1 KO #1 -1272.78 747.87 63.00
## poly(Olaparib, 3)1:genotypeALC1 KO #2 -3841.44 747.87 63.00
## poly(Olaparib, 3)2:genotypeALC1 KO #2 3027.78 747.87 63.00
## poly(Olaparib, 3)3:genotypeALC1 KO #2 -1095.97 747.87 63.00
## poly(Olaparib, 3)1:genotypeALC1 KO #3 -2371.95 747.87 63.00
## poly(Olaparib, 3)2:genotypeALC1 KO #3 2323.84 747.87 63.00
## poly(Olaparib, 3)3:genotypeALC1 KO #3 -998.31 747.87 63.00
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 955.00 747.87 63.00
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 977.10 747.87 63.00
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 -220.56 747.87 63.00
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 2525.30 747.87 63.00
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 528.20 747.87 63.00
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 -252.01 747.87 63.00
## t value Pr(>|t|)
## (Intercept) 9.365 6.03e-09 ***
## poly(Olaparib, 3)1 -11.860 < 2e-16 ***
## poly(Olaparib, 3)2 -2.543 0.013456 *
## poly(Olaparib, 3)3 0.696 0.489069
## genotypePARP1 KO -0.771 0.449579
## genotypeALC1 KO #1 -1.509 0.146202
## genotypeALC1 KO #2 -0.395 0.696616
## genotypeALC1 KO #3 -0.973 0.341701
## genotypeALC1 KO PARP1 KO #1 2.643 0.015224 *
## genotypeALC1 KO PARP1 KO #2 -1.383 0.181067
## poly(Olaparib, 3)1:genotypePARP1 KO 4.327 5.51e-05 ***
## poly(Olaparib, 3)2:genotypePARP1 KO -0.128 0.898715
## poly(Olaparib, 3)3:genotypePARP1 KO -1.586 0.117706
## poly(Olaparib, 3)1:genotypeALC1 KO #1 -3.424 0.001089 **
## poly(Olaparib, 3)2:genotypeALC1 KO #1 3.757 0.000378 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #1 -1.702 0.093708 .
## poly(Olaparib, 3)1:genotypeALC1 KO #2 -5.137 2.92e-06 ***
## poly(Olaparib, 3)2:genotypeALC1 KO #2 4.049 0.000143 ***
## poly(Olaparib, 3)3:genotypeALC1 KO #2 -1.465 0.147767
## poly(Olaparib, 3)1:genotypeALC1 KO #3 -3.172 0.002343 **
## poly(Olaparib, 3)2:genotypeALC1 KO #3 3.107 0.002831 **
## poly(Olaparib, 3)3:genotypeALC1 KO #3 -1.335 0.186720
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #1 1.277 0.206302
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #1 1.307 0.196128
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #1 -0.295 0.769026
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO #2 3.377 0.001261 **
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO #2 0.706 0.482620
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO #2 -0.337 0.737255
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit12))
## AIC: 1232.853
simres <- simulateResiduals(fittedModel = fit12)
plot(simres)

Final Result
fit <- fit7
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in WT |
-2.1289359 |
0.1641156 |
-12.9721723 |
0.0000000 |
| Olaparib2 in WT |
-0.4597677 |
0.1641156 |
-2.8014868 |
0.0062139 |
| Olaparib1: WT vs. PARP1 KO |
0.8370732 |
0.2320945 |
3.6066046 |
0.0005064 |
| Olaparib2: WT vs. PARP1 KO |
-0.1750941 |
0.2320945 |
-0.7544085 |
0.4525518 |
| Olaparib1: WT vs. ALC1 KO #1 |
-0.7505743 |
0.2320945 |
-3.2339164 |
0.0017021 |
| Olaparib2: WT vs. ALC1 KO #1 |
1.0165248 |
0.2320945 |
4.3797878 |
0.0000317 |
| Olaparib1: WT vs. ALC1 KO #2 |
-0.6688214 |
0.2320945 |
-2.8816770 |
0.0049338 |
| Olaparib2: WT vs. ALC1 KO #2 |
0.9436976 |
0.2320945 |
4.0660054 |
0.0001015 |
| Olaparib1: WT vs. ALC1 KO #3 |
-0.6018346 |
0.2320945 |
-2.5930584 |
0.0110840 |
| Olaparib2: WT vs. ALC1 KO #3 |
0.8060030 |
0.2320945 |
3.4727359 |
0.0007904 |
| Olaparib1: WT vs. ALC1 KO PARP1 KO #1 |
0.7148231 |
0.2320945 |
3.0798791 |
0.0027383 |
| Olaparib2: WT vs. ALC1 KO PARP1 KO #1 |
0.3506814 |
0.2320945 |
1.5109423 |
0.1342680 |
| Olaparib1: WT vs. ALC1 KO PARP1 KO #2 |
0.4476996 |
0.2320945 |
1.9289539 |
0.0568530 |
| Olaparib2: WT vs. ALC1 KO PARP1 KO #2 |
-0.0071566 |
0.2320945 |
-0.0308348 |
0.9754688 |
write.table(output, file = "Figure1D_Stats_Ref_WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1 KO #1")
fit <- lm(NormCounts2 ~ poly(Olaparib, 2)*genotype, data = dataset)
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in ALC1 KO #1 |
-2.8795102 |
0.1641156 |
-17.5456207 |
0.0000000 |
| Olaparib2 in ALC1 KO #1 |
0.5567570 |
0.1641156 |
3.3924686 |
0.0010269 |
| Olaparib1: ALC1 KO #1 vs. WT |
0.7505743 |
0.2320945 |
3.2339164 |
0.0017021 |
| Olaparib2: ALC1 KO #1 vs. WT |
-1.0165248 |
0.2320945 |
-4.3797878 |
0.0000317 |
| Olaparib1: ALC1 KO #1 vs. PARP1 KO |
1.5876474 |
0.2320945 |
6.8405210 |
0.0000000 |
| Olaparib2: ALC1 KO #1 vs. PARP1 KO |
-1.1916188 |
0.2320945 |
-5.1341964 |
0.0000016 |
| Olaparib1: ALC1 KO #1 vs. ALC1 KO #2 |
0.0817528 |
0.2320945 |
0.3522394 |
0.7254732 |
| Olaparib2: ALC1 KO #1 vs. ALC1 KO #2 |
-0.0728272 |
0.2320945 |
-0.3137825 |
0.7544044 |
| Olaparib1: ALC1 KO #1 vs. ALC1 KO #3 |
0.1487396 |
0.2320945 |
0.6408580 |
0.5232256 |
| Olaparib2: ALC1 KO #1 vs. ALC1 KO #3 |
-0.2105218 |
0.2320945 |
-0.9070519 |
0.3667750 |
| Olaparib1: ALC1 KO #1 vs. ALC1 KO PARP1 KO #1 |
1.4653973 |
0.2320945 |
6.3137955 |
0.0000000 |
| Olaparib2: ALC1 KO #1 vs. ALC1 KO PARP1 KO #1 |
-0.6658433 |
0.2320945 |
-2.8688455 |
0.0051209 |
| Olaparib1: ALC1 KO #1 vs. ALC1 KO PARP1 KO #2 |
1.1982739 |
0.2320945 |
5.1628703 |
0.0000014 |
| Olaparib2: ALC1 KO #1 vs. ALC1 KO PARP1 KO #2 |
-1.0236813 |
0.2320945 |
-4.4106226 |
0.0000282 |
write.table(output, file = "Figure1D_Stats_Ref_ALC1.txt", quote = F, sep = "\t", row.names = T, col.names = NA)